package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.domain.QuerryPage;
import com.zzyl.nursing.service.MemberProjectService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member/orders/project")
public class MemberProjectController {
    @Autowired
    private MemberProjectService memberProjectService;

    @GetMapping("/page")
    public TableDataInfo<NursingProject> getPage(QuerryPage querryPage){
        TableDataInfo<NursingProject> page = memberProjectService.getPage(querryPage);
        return page;
    }

    @GetMapping("/{id}")
    public R<NursingProject> getDetail(@PathVariable Long id){
        return R.ok(memberProjectService.getDetail(id));
    }

}
